package com.example.demo_one.kotlin

fun main() {

    val stu1 = Student(1001, "张三", 18, "CCtv", 102)
    println(stu1.id)
    println(stu1.name)
    println(stu1.age)
    println(stu1.toString())

    val stu2 = Student(1002, "李四", 19, "CSDN", 130)
    println(stu1.id == stu2.id)
    println(stu1.equals(stu2))

}

data class Student(
//  学号
    val id: Int,
    var name: String,
    var age: Int,
    val className: String,
    var score: Int
)